uniform mat4	modelviewProjectionMatrix;
uniform mat4	modelviewMatrix;

attribute vec4	position;
attribute vec2	uv;
attribute vec3	normal;
attribute vec3	tangent;

varying vec2	texCoords;
varying vec3	n, t, b;

void main()
{

	vec3 pos		= (modelviewMatrix * position).xyz;
	texCoords		= uv;
	
	// compute tangent space
	n			= normalize(vec3(modelviewMatrix * vec4(normal, 0.0)));
	t			= normalize(vec3(modelviewMatrix * vec4(tangent, 0.0)));
	b			= cross(n, t);
	
	gl_Position = modelviewProjectionMatrix * position;
	
}